window.onload=function(){
	zeai.listEach(zeai.tag(sotab,'li'),function(obj,k){
		obj.onclick=function(){
			if(!obj.hasClass('ed')){
				resetsotab();
				obj.class('ed');
				zeai.mask({son:o('sotab'+(k+1)),close:function(){obj.removeClass('ed');}});
			}else{
				resetsotab();
			}
		}
	});	
	souextresetbtn.onclick=function(){
		var liobj=zeai.tag(o('sotab3'),'li');
		zeai.listEach(liobj,function(li){
			li.removeClass('ed');
			v=li.getAttribute("v");
			if(zeai.empty(v)){li.addClass('ed');}
		});
		var liobj=zeai.tag(o('sotab3'),'input');
		zeai.listEach(liobj,function(li){
			if(li.type=='hidden')li.value='';
		});
		areaid.setAttribute('data','');
		area2id.setAttribute('data','');
		areatitle.html('');area2title.html('');
		keyword.value='';
	}
	o('areaid').onclick=function(){
		ZeaiM.div_up({obj:areabox,h:36});
		ZEAI_area({areaid:o('form_areaid').value,areatitle:o('form_areatitle').value,ul:areabox.children[0],bx:true,str:'job',end:function(z,e){
			o('areatitle').html(e);o('areatitle').class('ed');
			o('form_areaid').value=z;
			o('form_areatitle').value=e;
		}});
	}
	o('area2id').onclick=function(){
		ZeaiM.div_up({obj:areabox2,h:36});
		ZEAI_area({areaid:o('form_area2id').value,areatitle:o('form_area2title').value,ul:areabox2.children[0],bx:true,str:'hj',datastr:'hj',end:function(z,e){
			o('area2title').html(e);o('area2title').class('ed');
			o('form_area2id').value=z;
			o('form_area2title').value=e;
		}});
	}
}
function resetsotab(){
	zeai.listEach(zeai.tag(sotab,'li'),function(obj){if(!zeai.empty(obj)){obj.removeClass('ed');}});	
	for(var k=1;k<=3;k++) {objM=o('Msotab'+k);if(!zeai.empty(objM)){objM.click();}}
}
